package _07继承的特点_单继承;

public class ExtendDemo {
    public static void main(String[] args) {
        Son son = new Son();
        son.fa();
    }
}
class Son extends Father{

}
class Father extends GrandFather{
    public  void  fa(){
        System.out.println("运行了父类的fa方法");
    }
}
class GrandFather{
    public  void  fa(){
        System.out.println("运行了祖父类的fa方法");
    }
    public  void  grandFa(){
        System.out.println("运行了祖父类的grandFa方法");
    }
}